package com.hs.pk.berth.client;

import com.hs.pk.berth.client.dto.RoadBerthDto;
import com.hs.pk.berth.dto.BerthDto;
import com.hs.pk.berth.vo.FindRoadVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author lhj
 * @date 2022 - 07 - 21
 * @desc
 */
@FeignClient(value = "berth-server")
public interface BerthFeignClient {

    @GetMapping("/berth/{id}")
    RoadBerthDto findParkingDtoByBerthId(@PathVariable("id") Long id);

    @GetMapping("/road/searchByRoadName")
    BerthDto searchBerthDtoByRoadName(@RequestParam("roadName") String roadName);

    @GetMapping("/road/findAllRoad")
    public List<FindRoadVo> findAllRoad();
}
